//
//  UIImage+Extension.h
//  MiguFramework
//
//  Created by Victor Chee on 16/5/11.
//  Copyright © 2016年 Migu. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage(Extension)

- (UIImage *)imageWithTintColor:(UIColor *)tintColor;

- (UIImage *)imageWithGradientTintColor:(UIColor *)tintColor;

- (UIImage *)resize:(CGSize)size;

- (UIImage *)addWatermark:(NSString *)text atRect:(CGRect)rect;

- (UIImage *)roundCorner:(CGFloat)radius;

//! 图片的平均颜色
- (UIColor *)averageColor;

//! create a pure color image
+ (UIImage *)imageWithColor:(UIColor *)color;

/// 纯色图片
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;

//图片去色 (灰色)
+ (UIImage *)grayImage:(UIImage *)sourceImage;

@end
